#include "dialogInviter.h"

#include "fenetrePrincipale.h"

DialogInviter::DialogInviter(FenetrePrincipale * parent) {
    this->parent = parent;


    if (this->objectName().isEmpty())
        this->setObjectName(QString::fromUtf8("this"));

    this->setWindowTitle(tr("Nouvelle Partie - Locale"));
    this->resize(420, 226);

    buttonBox = new QDialogButtonBox(this);
    buttonBox->setObjectName(QString::fromUtf8("buttonBox"));
    buttonBox->setGeometry(QRect(70, 190, 340, 32));
    buttonBox->setOrientation(Qt::Horizontal);
    buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok);

    groupBox = new QGroupBox(this);
    groupBox->setObjectName(QString::fromUtf8("groupBox"));
    groupBox->setGeometry(QRect(10, 10, 400, 50));
    groupBox->setTitle(tr("Joueurs"));

    label_2 = new QLabel(groupBox);
    label_2->setObjectName(QString::fromUtf8("label_2"));
    label_2->setGeometry(QRect(230, 20, 52, 16));
    label_2->setText(tr("Joueur 2 (IP)"));

    label = new QLabel(groupBox);
    label->setObjectName(QString::fromUtf8("label"));
    label->setGeometry(QRect(10, 20, 50, 16));
    label->setText(tr("Joueur 1"));

    comboBox = new QComboBox(groupBox);
    comboBox->setObjectName(QString::fromUtf8("comboBox"));
    comboBox->setGeometry(QRect(70, 20, 100, 22));

    /*comboBox_2 = new QComboBox(groupBox);
    comboBox_2->setObjectName(QString::fromUtf8("comboBox_2"));
    comboBox_2->setGeometry(QRect(290, 20, 100, 22));*/
    lineEdit = new QLineEdit(groupBox);
    lineEdit->setObjectName(QString::fromUtf8("comboBox_2"));
    lineEdit->setGeometry(QRect(290, 20, 100, 22));
    lineEdit->setText(tr("0.0.0.0"));

    groupBox_2 = new QGroupBox(this);
    groupBox_2->setObjectName(QString::fromUtf8("groupBox_2"));
    groupBox_2->setGeometry(QRect(10, 70, 400, 111));
    groupBox_2->setTitle(tr("Options de jeu"));

    checkBox = new QCheckBox(groupBox_2);
    checkBox->setObjectName(QString::fromUtf8("checkBox"));
    checkBox->setGeometry(QRect(10, 20, 120, 18));
    checkBox->setText(tr("Chronometre"));

    checkBox_2 = new QCheckBox(groupBox_2);
    checkBox_2->setObjectName(QString::fromUtf8("checkBox_2"));
    checkBox_2->setGeometry(QRect(10, 50, 260, 18));
    checkBox_2->setText(tr("Ne pas prendre en compte le resultat"));

    checkBox_3 = new QCheckBox(groupBox_2);
    checkBox_3->setObjectName(QString::fromUtf8("checkBox_3"));
    checkBox_3->setGeometry(QRect(10, 80, 120, 18));
    checkBox_3->setText(tr("Entrainement"));

//    retranslateUi(this);
    QObject::connect(buttonBox, SIGNAL(accepted()), this, SLOT(bouton_OK()));
    QObject::connect(buttonBox, SIGNAL(rejected()), this, SLOT(bouton_Annuler()));

//    QMetaObject::connectSlotsByName(this);
    } // setupUi


void DialogInviter::bouton_OK() {
    emit valider(lineEdit->text());
    emit accept();
}
void DialogInviter::bouton_Annuler() {
    emit reject();
}
